This simulation demonstrates the Maxwell-Boltzmann speed distribution — a fundamental result from kinetic theory of gases that describes how particle speeds are distributed in an ideal gas at thermal equilibrium.
Controls:
- Number of particles (N): Adjust from 100 to 10,000 particles. More particles give smoother statistical distributions but may slow the simulation.
- Temperature (T): Controls the average kinetic energy of particles. Higher temperature means faster particles on average.
What you see:
- Left panel: Gas chamber showing particles (black dots) undergoing elastic collisions with each other and the walls.
- Right panel: Real-time histogram of particle speeds compared to the theoretical Maxwell distribution.
Understanding the histogram:
- Grey bars: Measured speed distribution from the simulation. Axes are given local simulation units, not to real-life scale.
- Red curve: Theoretical 2D Maxwell distribution: f(v) = (v/σ²) × exp(-v²/2σ²)
- vmp (blue): Most probable speed — peak of the distribution.
- vmean (red): Mean (average) speed of all particles.
- vrms (purple): Root-mean-square speed — related to average kinetic energy.
Things to explore:
- Increase temperature and watch the distribution shift right and broaden.
- Notice that vmp < vmean < vrms always holds (the distribution is asymmetric).
- Use more particles to see the histogram match the theoretical curve more closely.
- Observe how quickly the system reaches equilibrium after changing parameters.
Note: This is a 2D simulation, so it uses the 2D Maxwell distribution. The characteristic speed ratios differ slightly from the 3D case you may see in textbooks.